<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/Tecnico/template.xhtml">
	<ui:define name="conteudo">
	 <p:messages/>
	 <div align="center" >
	 	<h:panelGrid columns="2" cellpadding="10">
	 		<p:outputLabel value="#{msg['usuario.nome']} *"/>
			<p:inputText value="#{usuarioController.usuario.nome}" required="true" label="#{msg['usuario.nome']}" requiredMessage="#{msg['mensagem.nome']}" validatorMessage="#{msg['mensagem.nomeInvalido']}">
			<f:validateRegex pattern="^[aA-zZ]+((\s[aA-zZ]+)+)?$"/>
			</p:inputText>
			
			<p:outputLabel value="#{msg['usuario.login']} *"/>
			<p:inputText value="#{usuarioController.usuario.login}" required="true" label="#{msg['usuario.login']}" requiredMessage="#{msg['mensagem.login']}"/>
			
			<p:outputLabel value="#{msg['usuario.senha']} *"/>
			<p:password value="#{usuarioController.usuario.senha}" label="#{msg['usuario.senha']}" required="true" requiredMessage="#{msg['mensagem.senha']}"/>
			
			<h:outputText value="#{msg['usuario.email']} *"/>
			<p:inputText value="#{usuarioController.usuario.email}" required="true" label="#{msg['usuario.email ']}" requiredMessage="#{msg['mensagem.email']}" validatorMessage="#{msg['mensagem.emailInvalido']}">
				<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
			</p:inputText>
			
			<p:commandButton ajax="false" type="submit" value="#{msg['botao.cadastrar']}" action="#{usuarioController.cadastrar}" /> 
			<p:commandButton ajax="false" type="submit" value="#{msg['botao.voltar']}" action="/Tecnico/homeTecnico.xthml" immediate="true" />
	 	</h:panelGrid>
	 </div>
	</ui:define>
</ui:composition>
</html>
